package org.compactmvc.demo.view.helpers
{
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.text.TextField;
	
	import org.compactmvc.demo.ApplicationController;
	import org.compactmvc.demo.model.ApplicationModel;
	import org.compactmvc.viewpatterns.AbstractViewComponent;

	
	[Embed(source="./assets/assets.swf", symbol="MainButtonMc")]
	public class MainButton extends AbstractViewComponent
	{

		[Inject]
		public var model:ApplicationModel;
		
		public var tf:TextField;
		
		public function MainButton(viewName:String)
		{
			super(viewName, ApplicationController.NAME);
		}
		
		override protected function postRegisterHandler():void
		{
			mouseChildren = false;
			tf.text = "yo";			
		}
		
		override protected function postRemoveHandler():void
		{
			//destroy view here
		}
		
		
	}
}